-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: update ucanto to invocation spec compatible result type #272
Conversation
f398140
to
59d2db7
Compare
* @param {string} message | ||
* @returns {{error:API.Failure, ok?:undefined}} | ||
*/ | ||
export const fail = message => ({ error: new Failure(message) }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How should I decide when to use error
vs fail
? Can a comment or @fileoverview
explain?
This is a big change to use the |
Overview
null|undefined
values in Results and push towards use of unit value{}
instead.false
and""
are still allowed..derives
methods than no longer returntrue
orFailure
but instead returnResult<{}, Failure>
.error: true
field which were in place to pattern match on ok / error.